<div id="menu">
    <ul class="menu">
        {foreach from=$Menu item=item}
            {if isset($item.submenu)}
                <li>
                    <a class="parent" href="{$item.url}"><span>{$item.title}</span></a>
                    <div>
                        <ul>
                           {foreach from=$item.submenu item=sub} 
                               {if isset($sub.submenu)} 
                                    <li><a class="parent" href="{$sub.url}"><span>{$sub.title}</span></a>
                                        <div>
                                            <ul>
                                                {foreach from=$sub.submenu item=sub2} 
                                                    <li><a href="{$sub2.url}"><span>{$sub2.title}</span></a></li> 
                                                {/foreach}
                                            </ul>
                                        </div>
                                    </li> 
                               {else}
                                    <li><a href="{$sub.url}"><span>{$sub.title}</span></a></li> 
                               {/if}
                           {/foreach}
                        </ul>
                    </div>
                </li>
            {else}
                <li><a href="{$item.url}"> <span class="lvl">{$item.title}</span></a></li>
            {/if}
        {/foreach}
    <!--    <li><a href="http://xengine.loc/admin/blocks" toptions="group = links, title = 'Top up title', shaded = 1, type = iframe, effect = switch, width = 1200, height = 500, x = 50, y=50, layout = quicklook"> <span class="lvl">Help</span></a></li>
      -->  
    </ul>
    
    <div id="action_pannel">
     <ul id="lap">
      <li style="width: 35px"> <a href="{$Home}"> <img width="20" src="{$BACKEND_IMAGES}AdminMenu/home.png" /> </a> </li>
      <li> <a href="{$LogOut}" ><img width="20" src="{$BACKEND_IMAGES}AdminMenu/exit2.png" /></a> </li>
     </ul>
    </div>
</div>
